@extends('admin.layouts.app')


@section('content')

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="page-title">咨询管理</h4>
                                <ol class="breadcrumb">
                                    <li><a href="{{url('zadmin')}}">系统</a></li>
                                   
                                    <li class="active">咨询列表</li>
                                </ol>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6 col-sm-6 col-lg-4">
                                <div class="card-box widget-box-1 bg-white">
                                    <i class="fa fa-info-circle text-muted pull-right inform" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Last 24 Hours"></i>
                                    <h4 class="text-dark">总咨询量</h4>
                                    <h2 class="text-primary text-center"><span data-plugin="counterup">{{$tasks_total}}</span></h2>
                                    
                                </div>
                            </div>

                           <div class="col-md-6 col-sm-6 col-lg-4">
                                <div class="card-box widget-box-1 bg-white">
                                    <i class="fa fa-info-circle text-muted pull-right inform" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Last 24 Hours"></i>
                                    <h4 class="text-dark">待回复</h4>
                                    <h2 class="text-danger text-center"><span data-plugin="counterup">{{$wait}}</span></h2>
                                    
                                </div>
                            </div>
                          

                            <div class="col-md-6 col-sm-6 col-lg-4">
                                <div class="card-box widget-box-1 bg-white">
                                    <i class="fa fa-info-circle text-muted pull-right inform" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Last 24 Hours"></i>
                                    <h4 class="text-dark">已回复</h4>
                                    <h2 class="text-success text-center"><span data-plugin="counterup">{{$done}}</span></h2>
                                    
                                </div>
                            </div>

                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                        			<div class="row">
			                        	<div class="col-sm-12">
			                        		<form role="form">
			                                    <div class="form-group contact-search m-b-30">
			                                    	<input type="text" name="keyword" value="{{array_get($param,'keyword')}}" class="form-control" placeholder="输入标题或者内容搜索">
			                                        <button type="submit" class="btn btn-white"><i class="fa fa-search"></i></button>
			                                    </div> <!-- form-group -->
			                                </form>
			                        	</div>
                                <!-- <div class="col-sm-4">
                                             
                                               <a href="{{url('zadmin/consults/export')}}" class="btn btn-primary" id="exportBtn">导出</a>
                                            </div> -->
			                        	
			                        </div>

                              @if(session('rs'))
                              <div class="alert alert-{{session('rs')['status']}}">
                                {{ session('rs')['msg'] }}
                              </div>
                              @endif
			                        
                        			<div class="table-responsive">
    <table class="table table-hover">
        <thead>
			<tr>
				<th style="min-width: 35px;">
					<div class="checkbox checkbox-primary checkbox-single m-r-15">
            <input id="action-checkbox" type="checkbox">
            <label for="action-checkbox"></label>
                    </div>
                                                        
													</th>
						<th>标题</th>
            <th>提交者</th>
            <th>专家</th>                      
                        
                      
                        
                          
            <th>状态</th>
                         
						<th>发布日期</th>
                         
					<th style="width: 200px;">操作</th>
					</tr>
					</thead>
											
                    <tbody>

                    @foreach($list as $v)
                        <tr>
                            <td>
                                {{$v->id}}
                                                        
                                                      
                            </td>
                                                    
            <td>
                {{$v->title}}
            </td>
            <td>{{object_get($v,'wxuser.truename')}}</td>
                                    
            <td>
                {{object_get($v,'expert.user.truename')}}
            </td>

                                                   
                                                    
                                    

                                                  
                                                    
                                                    
                                                    <td>
                                                   
    <a  class="btn-sm btn btn-{{$v->status_style}} btn-custom">{{$v->status_txt}}</a>
                                                        
                                                    </td>
                                                    <td>
                                                        {{$v->created_at}}
                                                    </td>
                                                    <td>
                                                   
<a class="btn btn-info btn-sm" href="{{url('zadmin/consults',$v->id)}}">详情</a>

<!-- <a class="btn btn-primary btn-sm btn-dispath" data-id="{{$v->id}}">派工</a> -->
                                                     

                                                      

                                                     

                                                                                                            
<!-- <a class="btn btn-danger btn-sm" href="{{url('zadmin/consults/del',$v->id)}}" class="del" data-id="{{$v->id}}">删除</a> -->
                                                    </td>
                                                </tr>
                                            @endforeach    
                                                
                                               
                                               
                                                
                                               
                                                
                                            
                                            </tbody>
                                        </table>
                                    </div>
                                    {{ $list->appends($param)->links() }}
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection

@section('modal')                        

                       
@endsection                         

                  
            
    
       

           



    
@section('js')
<script type="text/javascript">

</script>
         
@endsection
    
